import asyncio
import websockets
import json


async def hello():
	async with websockets.connect(
			'ws://localhost:6789') as websocket:
		# msg = json.dumps({'action': 'plus'})
		# await websocket.send(msg)
		# print(f"↑ {msg}")

		while True:
			greeting = await websocket.recv()
			print(f"↓ {greeting}")

asyncio.get_event_loop().run_until_complete(hello())
